Skip to content

fix(ui): bound desktop runtime worker allocation#1375

Closed
maybeknott wants to merge 1 commit into
therealaleph:mainfrom
maybeknott:fix/desktop-runtime-workers
Closed

fix(ui): bound desktop runtime worker allocation#1375
maybeknott wants to merge 1 commit into
therealaleph:mainfrom
maybeknott:fix/desktop-runtime-workers

Conversation

@maybeknott
Copy link
Copy Markdown

Replace the desktop UI background runtime's implicit Tokio defaults with an explicit multi-thread runtime builder. The UI now sizes its async worker pool from available_parallelism(), clamps long-lived worker threads to a small 2..=4 range, names worker threads as mhrv-ui-worker, and bounds the blocking pool separately at 32 threads.

This keeps proxy lifecycle tasks, stats polling, certificate operations, tests, scans, and update/download work on the same command paths while making the scheduler shape predictable on both low-core machines and high-core desktops. Small devices avoid a single-worker UI runtime, and large desktops avoid creating an oversized worker pool for a UI-owned background coordinator.

Log the selected runtime shape at UI startup so support reports can distinguish runtime sizing from proxy transport behavior. Add focused unit coverage for the worker-count policy across low-core, midrange, and high-core inputs.

Replace the desktop UI background runtime's implicit Tokio defaults with an explicit multi-thread runtime builder. The UI now sizes its async worker pool from available_parallelism(), clamps long-lived worker threads to a small 2..=4 range, names worker threads as mhrv-ui-worker, and bounds the blocking pool separately at 32 threads.

This keeps proxy lifecycle tasks, stats polling, certificate operations, tests, scans, and update/download work on the same command paths while making the scheduler shape predictable on both low-core machines and high-core desktops. Small devices avoid a single-worker UI runtime, and large desktops avoid creating an oversized worker pool for a UI-owned background coordinator.

Log the selected runtime shape at UI startup so support reports can distinguish runtime sizing from proxy transport behavior. Add focused unit coverage for the worker-count policy across low-core, midrange, and high-core inputs.
@github-actions github-actions Bot added the type: fix fix: PR — auto-applied by release-drafter label May 24, 2026
@maybeknott maybeknott closed this May 24, 2026
@maybeknott maybeknott deleted the fix/desktop-runtime-workers branch May 24, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix fix: PR — auto-applied by release-drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant